package DTO;

import org.Consts;
import org.Globals;
import org.sqlStatements;

import android.R.string;
import android.content.ContentValues;
import android.database.sqlite.SQLiteDatabase;
import android.graphics.Color;

public class PropertiesDTO{

	static SQLiteDatabase db = Globals.sqlDB;
	int pID;
	public int color;
	public int fill;
	public int strokeSize;
	
	public PropertiesDTO(){
		color=Color.BLACK;
		strokeSize=0;
		fill=0;
	}

	public static SQLiteDatabase getDb() {
		return db;
	}

	public static void setDb(SQLiteDatabase db) {
		PropertiesDTO.db = db;
	}

	public int getpID() {
		return pID;
	}

	public void setpID(int pID) {
		this.pID = pID;
	}

	public int getColor() {
		return color;
	}

	public void setColor(int color) {
		this.color = color;
	}

	public int getFill() {
		return fill;
	}

	public void setFill(int fill) {
		this.fill = fill;
	}

	public int getStrokeSize() {
		return strokeSize;
	}

	public void setStrokeSize(int strokeSize) {
		this.strokeSize = strokeSize;
	}

	public PropertiesDTO(int color, int fill, int strokeSize) {
		this.color = color;
		this.fill = fill;
		this.strokeSize = strokeSize;

		ContentValues values = new ContentValues();

		values.put(sqlStatements.COLOR, color);
		values.put(sqlStatements.FILL, fill);
		values.put(sqlStatements.STROKE_SIZE, strokeSize);

		pID = (int) db.insert(sqlStatements.PROPERTIES, null, values);
		return;
	}

}
